package com.project.service;

import com.project.daos.RoleMapper;
import com.project.entity.Role;
import com.project.entity.RoleUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class RoleService {

    @Autowired
    private RoleMapper roleMapper;

    public Integer addUserRole(Integer role_id,Integer user_id){
        return roleMapper.addUserRole(role_id,user_id);
    }

    public RoleUser selUserRoleByUid(Integer uid){
        return roleMapper.selUserRoleByUid(uid);
    }
}
